Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

Q is empty.


QTRS
  ↳ Non-Overlap Check

Q restricted rewrite system:
The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

Q is empty.

The TRS is non-overlapping. Hence, we can switch to innermost.

↳ QTRS
  ↳ Non-Overlap Check
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

The set Q consists of the following terms:

ap2(ap2(f, x0), x0)
ap2(ap2(ap2(foldr, x0), x1), nil)
ap2(ap2(ap2(foldr, x0), x1), ap2(ap2(cons, x2), x3))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(f, x), x) -> AP2(x, ap2(f, x))
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(g, x)
AP2(ap2(f, x), x) -> AP2(ap2(cons, x), nil)
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))
AP2(ap2(f, x), x) -> AP2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
AP2(ap2(f, x), x) -> AP2(cons, x)
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(ap2(foldr, g), h), xs)

The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

The set Q consists of the following terms:

ap2(ap2(f, x0), x0)
ap2(ap2(ap2(foldr, x0), x1), nil)
ap2(ap2(ap2(foldr, x0), x1), ap2(ap2(cons, x2), x3))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(f, x), x) -> AP2(x, ap2(f, x))
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(g, x)
AP2(ap2(f, x), x) -> AP2(ap2(cons, x), nil)
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))
AP2(ap2(f, x), x) -> AP2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
AP2(ap2(f, x), x) -> AP2(cons, x)
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(ap2(foldr, g), h), xs)

The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

The set Q consists of the following terms:

ap2(ap2(f, x0), x0)
ap2(ap2(ap2(foldr, x0), x1), nil)
ap2(ap2(ap2(foldr, x0), x1), ap2(ap2(cons, x2), x3))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ Non-Overlap Check
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP

Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(g, x)
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))
AP2(ap2(f, x), x) -> AP2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
AP2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> AP2(ap2(ap2(foldr, g), h), xs)

The TRS R consists of the following rules:

ap2(ap2(f, x), x) -> ap2(ap2(x, ap2(f, x)), ap2(ap2(cons, x), nil))
ap2(ap2(ap2(foldr, g), h), nil) -> h
ap2(ap2(ap2(foldr, g), h), ap2(ap2(cons, x), xs)) -> ap2(ap2(g, x), ap2(ap2(ap2(foldr, g), h), xs))

The set Q consists of the following terms:

ap2(ap2(f, x0), x0)
ap2(ap2(ap2(foldr, x0), x1), nil)
ap2(ap2(ap2(foldr, x0), x1), ap2(ap2(cons, x2), x3))

We have to consider all minimal (P,Q,R)-chains.